Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use quotes to reference the runnerPath when spewing the command fixes #105 #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jwoodrow
Copy link

@jwoodrow jwoodrow commented Nov 7, 2021

Looks like the rails runner interprets anything starting with a / as a regex so when the runnerPath ends up being an absolute path it breaks.

fixes #105

@jwoodrow jwoodrow changed the title use quotes to reference the runnerPath when spewing the command use quotes to reference the runnerPath when spewing the command fixes #105 Nov 7, 2021
@PikachuEXE
Copy link
Collaborator

Thanks for your PR!
Is it possible to add a test case to ensure this won't be broken again?

@texpert
Copy link
Contributor

texpert commented May 5, 2024

Yes, on Yarn 4.x I've got this failure running a pet project with shakapacker-dev-server:

ERROR in ./app/javascript/src/js/pagy.js.erb
Module build failed (from ./.yarn/__virtual__/rails-erb-loader-virtual-55fc15ca4e/5/thunder/.yarn/berry/cache/rails-erb-loader-https-7752a0de6a-10c0.zip/node_modules/rails-erb-loader/index.js):
Error: rails-erb-loader failed with code: 1
    at ChildProcess.<anonymous> (/Users/Shared/dev/ruby/rails_6_rss_reader/.yarn/__virtual__/rails-erb-loader-virtual-55fc15ca4e/5/thunder/.yarn/berry/cache/rails-erb-loader-https-7752a0de6a-10c0.zip/node_modules/rails-erb-loader/index.js:129:16)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:518:28)
    at Pipe.<anonymous> (node:net:337:12)
 @ ./app/javascript/packs/application.js 24:0-31

webpack 5.91.0 compiled with 1 error in 4223 ms

Using the 'moonproject:master' branch solved the issue.

I've took a glance at the tests, but have no idea how to test this. Weird is, testing this branch results in this, cited above, error on 9 tests. Everything's OK, though, when running the app (development mode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Having issues using rails-erb-loader with yarn 2
3 participants